const root='http://127.0.0.1:8085'

const Api={
  "login":(username,password)=>`${root}/doctor/login?username=${username}&password=${password}`,
  'register':(username,password,phone,dName,age,gender,positionTime,jpg)=>`${root}/doctor/register?username=${username}&password=${password}&phone=${phone}&dName=${dName}&age=${age}&gender=${gender}&positionTime=${positionTime}&durl=${jpg}`,
  'getDoctor':(username)=>`${root}/doctor/information?username=${username}`,
  'delDoctor':(dusername)=>`${root}/vaccine/del/${dusername}`,
  'updateDoctor':(username,password,age,dName,dgender,phone)=>`${root}/doctor/update?username=${username}&password=${password}&age=${age}&dName=${dName}&dgender=${dgender}&phone=${phone}`,

  'getAdvise':(username)=>`${root}/doctor/advise?dNo=${username}`,
  'sendAdvise':(id,advise)=>`${root}/doctor/send_advise?advise=${advise}&id=${id}`,
  'doctorList':()=>`${root}/doctor/list`,
  'getHandledCases':(dusername)=>`${root}/doctor/handling?dusername=${dusername}`,
  'toSign':(cNo)=>`${root}/doctor/toSign/${cNo}`,

  //病患
  'plogin':(username,password)=>`${root}/patient/login?username=${username}&password=${password}`,
  'pregister':(username,password,gender,birthday,pName,phone,more)=>`${root}/patient/register?username=${username}&password=${password}&gender=${gender}&birthday=${birthday}&pName=${pName}&phone=${phone}&more=${more}`,
  'getPatient':(username)=>`${root}/patient?username=${username}`,
  // 'updatePatient':(username,pName,gender,birthday,phone,password,more)=>`${root}/patient/update/${pusername}/${pName}/${pgender}/${pbirthday}/${pphone}/${ppassword}/${pmore}`,
  'updatePatient':()=>`${root}/patient/update`,
  

  //疫苗
  'getVaccines':()=>`${root}/vaccines`,
  'searchVaccine':(vName)=>`${root}/vaccine?vName=${vName}`,
  'sName':(same)=>`${root}/doctor/listByLike?sname=${same}`,
  'delVaccine':(vid)=>`${root}/vaccine/del/${vid}`,
  'insertVaccine':(vName,pathogenesis,precaution,handling)=>`${root}/vaccine/insert?vName=${vName}&pathogenesis=${pathogenesis}&precaution=${precaution}&handling=${handling}`,
  'modifiedVaccine':(vid,vName,pathogenesis,precaution,handling)=>`${root}/vaccine/modified?vid=${vid}&vName=${vName}&pathogenesis=${pathogenesis}&precaution=${precaution}&handling=${handling}`,
  //预约
  'buildCase':(pusername,dusername,describe)=>`${root}/patient/creat_case?pNo=${pusername}&dNo=${dusername}&describe=${describe}`,
  'addPAppointmentToDoctor':(cNo,aTime)=>`${root}/appointment/doctor?cNo=${cNo}&aTime=${aTime}`,
  'addPAppointmentToVaccine':(cNo,aTime,vNo,pName)=>`${root}/appointment/vaccine/${cNo}/${aTime}/${vNo}/${pName}`,
  'modifiedTime':(aTime,cNo)=>`${root}/modifyTime/${aTime}/${cNo}`,
  'getPatientAppointment':(username)=>`${root}/patientAppointment?pusername=${username}`,
  'getPatientAppointments':()=>`${root}/patientAppointments`,
  // 'doctorAppointmentList':(username)=>`${root}/doctorAppointmentTime?dusername=${username}`,
  'delAppointment':(cNo)=>`${root}/appointment/del?cNo=${cNo}`,
  'currentDayAppointment':(dusername)=>`${root}/doctor/current?dusername=${dusername}`
};
export default Api;
